<template>
    <el-card class="not-found-card">
      <template #header>
        <h1>404 - 页面未找到</h1>
      </template>
      <div class="content">
        <img src="https://via.placeholder.com/300" alt="404 Image" class="not-found-img">
        <p class="message">很抱歉，您访问的页面不存在。</p>
        <el-button type="primary" @click="goBackHome">返回首页</el-button>
      </div>
    </el-card>
  </template>
  
  <script setup lang="ts">
  import { useRouter } from 'vue-router';
  
  const router = useRouter();
  
  const goBackHome = () => {
    router.push('/');
  };
  </script>
  
  <style scoped>
  .not-found-card {
    width: 400px;
    margin: 100px auto;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
  }
  
  .not-found-img {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
  }
  
  .message {
    font-size: 18px;
    margin-bottom: 30px;
  }
  </style>